{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a8d11024-fcf8-4035-8103-4c0812a3e602",
   "metadata": {},
   "outputs": [],
   "source": [
    "#实现两个整数的简易计算\n",
    "#使用四则运算，四则运算符可任选一个；最后一行自动输出结果\n",
    "a=input('请输入第一个整数')\n",
    "b=input('请输入第二个整数')\n",
    "num1=int(a)\n",
    "num2=int(b)\n",
    "c=input('请输入+,-,*,/四个运算符号中的任意一个: ')\n",
    "result=eval(f'{num1}{c}{num2}')\n",
    "print(f'运算结果是: {result}')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
